<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>F.colorPicker演示</title>
<style type="text/css">
body{font-size:12px;font-family:Arial;}
input{border:1px solid #aaa}
</style>
<script type="text/javascript" src="../../1st.js"></script>
</head>
<body>
<br/>
<br/>
<br/>
<br/>
<h1>简单的颜色设置器</h1>
设置背景颜色: <input type="text" id="bb" />

设置文本颜色: <input type="text" id="bb2" />

<script type="text/javascript">
F.colorPicker("bb","bb2").callback(function(obj){
	if(obj.id=="bb"){
		document.body.color = obj.value;
	}else{
		document.body.bgcolor = obj.value;
	}
	document.body.style[obj.id=='bb'?'background':'color']=obj.value;
});
</script>
</body>
</html>